package vn.vfriends.vcms.admin.service;

import java.io.Serializable;
import java.util.List;
import vn.vfriends.vcms.admin.model.Role;
import vn.vfriends.vcms.admin.model.RoleCode;

/**
 *
 * @author tuan@vfriends.vn
 */
public interface RoleService extends Serializable {
    public void createRole(Role role) throws Exception;
    
    public void editRole(Role role) throws Exception;
    
    public void destroyRole(Long id) throws Exception;
    
    public List<Role> findRoles();
    
    public List<Role> findRoles(int maxResults, int firstResult);
    
    public Role findRole(Long id);
    
    public Role findRoleByName(String name);
    
    public Role findRoleByCode(RoleCode code);
    
    public List<Role> findRolesByLink(String link);
    
    public int getRoleCount();
}
